<template>
  <my-table
    style="width: 100%;padding-top: 15px;"
    :data="list"
    :loading="loading"
    :columns="tableColumns"
    :isShowPagination="false"
    :border="false"
    tableSize="normal"
    :showSummary="true"
  />

</template>

<script setup lang="ts">
import MyTable from '@/components/MyTable/index.vue'
import { getDashboardTable } from '@/api/dashboard'
import { ElMessage } from 'element-plus'
import { onMounted, ref } from 'vue'
import tableColumns from './tableColumns'

const list = ref([])
const loading = ref(false)

const getList = async () => {
  loading.value = true
  try {
    const { data } = await getDashboardTable()
    list.value = (data as any).list
  } catch (error) {
    ElMessage.error((error as any).msg)
  } finally {
    loading.value = false
  }
}


onMounted(() => {
  getList()
})

</script>